using System;
using RomanJendrusz.Amazon.ETL.Domain;
namespace RomanJendrusz.Amazon.ETL.Messages
{
    public class GetBookDetailsResponse: AmazonResponse
    {
        public GetBookDetailsResponse(Guid correlationId) : base(correlationId)
        {
        }

        public Book RetrievedBook { get; set; }

        public bool Equals(GetBookDetailsResponse getBookDetailsResponse)
        {
            if (getBookDetailsResponse == null) return false;
            if (!base.Equals(getBookDetailsResponse)) return false;
            return Equals(RetrievedBook, getBookDetailsResponse.RetrievedBook);
        }



        public override bool Equals(object obj)
        {
            if (ReferenceEquals(this, obj)) return true;
            return Equals(obj as GetBookDetailsResponse);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode() + 29*(RetrievedBook != null ? RetrievedBook.GetHashCode() : 0);
        }
    }
}